/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

#ifndef _FLOAT_H
#define _FLOAT_H

#ifdef	__cplusplus
extern "C" {
#endif

#define FLT_ROUNDS    1
#define FLT_RADIX     2

/**
 * FLT_RADIX DIGit in MANTissa
 */
#define FLT_MANT_DIG  24
/**
 * FLT_RADIX DIGit in MANTissa
 */
#define DBL_MANT_DIG  53
/**
 * FLT_RADIX DIGit in MANTissa
 */
#define LDBL_MANT_DIG 53

/**
 * decimal DIGit precision
 */
#define FLT_DIG   6
/**
 * decimal DIGit precision
 */
#define DBL_DIG  15
/**
 * decimal DIGit precision
 */
#define LDBL_DIG 15

/**
 * distinction limit: min e : 1+e != 1
 */
#define FLT_EPSILON  1.192092896e-07F
/**
 * distinction limit: min e : 1+e != 1
 */
#define DBL_EPSILON  2.2204460492503131e-016
/**
 * distinction limit: min e : 1+e != 1
 */
#define LDBL_EPSILON 2.2204460492503131e-016

/**
 * min n : FLT_RADIX^n is expressible as float
 */
#define FLT_MIN_EXP   -125
/**
 * min n : FLT_RADIX^n is expressible as float
 */
#define DBL_MIN_EXP  -1021
/**
 * min n : FLT_RADIX^n is expressible as float
 */
#define LDBL_MIN_EXP -1021

/**
 * max n : FLT_RADIX^n is expressible as float
 */
#define FLT_MAX_EXP   128
/**
 * max n : FLT_RADIX^n is expressible as float
 */
#define DBL_MAX_EXP  1024
/**
 * max n : FLT_RADIX^n is expressible as float
 */
#define LDBL_MAX_EXP 1024

/**
 * min n : 10^n is expressible as float
 */
#define FLT_MIN_10_EXP   -37
/**
 * min n : 10^n is expressible as float
 */
#define DBL_MIN_10_EXP  -307
/**
 * min n : 10^n is expressible as float
 */
#define LDBL_MIN_10_EXP -307

/**
 * max n : 10^n is expressible as float
 */
#define FLT_MAX_10_EXP   38
/**
 * max n : 10^n is expressible as float
 */
#define DBL_MAX_10_EXP  308
/**
 * max n : 10^n is expressible as float
 */
#define LDBL_MAX_10_EXP 308

/**
 * min of float
 */
#define FLT_MIN  1.175494351e-38F
/**
 * min of float
 */
#define DBL_MIN  2.2250738585072014e-308
/**
 * min of float
 */
#define LDBL_MIN 2.2250738585072014e-308

/**
 * max of float
 */
#define FLT_MAX  3.402823466e+38F
/**
 * max of float
 */
#define DBL_MAX  1.7976931348623158e+308
/**
 * max of float
 */
#define LDBL_MAX 1.7976931348623158e+308

#ifdef	__cplusplus
}
#endif

#endif
